#include "colormap.h"
/**
 * colormaps derived from GNU Octave with the command:
 * a=floor(XXX(256)*255); for(i=1:256) printf("0x%02X%02X%02X, ", a(i,1), a(i,2), a(i,3)); if(i/8==floor(i/8)) printf("\n") endif endfor
 * with XXX = gray, jet, hsv, hot, cool, spring, summer, autumn, winter, bone, copper, pink, flag
 * warning: longs are 64 bit on AMD64, using unsigned prevents this. Make sure you don't read the highest 16 bits
 * as alpha value. Alpha is FF by default and should remain so.
 */
Colormap::Colormap(){
	// initialize mapsQVector
	for(int i=0; i<13; i++){
		QVector<QColor> *map = new QVector<QColor>;
		for(int j=0; j<256; j++){
			QColor* color = new QColor(QColor::fromRgb(Colormap::mapsUInt[i][j]));
			*map += *color;
		}
		mapsQVector[i] = map;
	}
}

Colormap::~Colormap(){
	delete mapsQVector;
}
///static
const char *Colormap::getName(int i){
	return mapNames[i];
}
///static
const unsigned *Colormap::getUInt(int i){
	return mapsUInt[i];
}

QVector<QColor> Colormap::getQVector(int i) const{
	return *mapsQVector[i];
}
///static
const char *Colormap::mapNames[] = {"gray", "jet", "hsv", "hot", "cool", "spring", "summer",
		"autumn", "winter", "bone", "copper", "pink", "flag"};
///static
const unsigned *Colormap::mapsUInt[] = {gray, jet, hsv, hot, cool, spring, summer, autumn, winter, bone, copper, pink, flag};

const unsigned Colormap::gray[] = {
0x000000, 0x010101, 0x020202, 0x030303, 0x040404, 0x050505, 0x060606, 0x070707,
0x080808, 0x090909, 0x0A0A0A, 0x0B0B0B, 0x0C0C0C, 0x0D0D0D, 0x0E0E0E, 0x0F0F0F,
0x101010, 0x111111, 0x121212, 0x131313, 0x141414, 0x151515, 0x161616, 0x171717,
0x181818, 0x191919, 0x1A1A1A, 0x1B1B1B, 0x1C1C1C, 0x1D1D1D, 0x1E1E1E, 0x1F1F1F,
0x202020, 0x212121, 0x222222, 0x232323, 0x242424, 0x252525, 0x262626, 0x272727,
0x282828, 0x292929, 0x2A2A2A, 0x2B2B2B, 0x2C2C2C, 0x2D2D2D, 0x2E2E2E, 0x2F2F2F,
0x303030, 0x313131, 0x323232, 0x333333, 0x343434, 0x353535, 0x363636, 0x373737,
0x383838, 0x393939, 0x3A3A3A, 0x3B3B3B, 0x3C3C3C, 0x3D3D3D, 0x3E3E3E, 0x3F3F3F,
0x404040, 0x414141, 0x424242, 0x434343, 0x444444, 0x454545, 0x464646, 0x474747,
0x484848, 0x494949, 0x4A4A4A, 0x4B4B4B, 0x4C4C4C, 0x4D4D4D, 0x4E4E4E, 0x4F4F4F,
0x505050, 0x515151, 0x525252, 0x535353, 0x545454, 0x555555, 0x565656, 0x575757,
0x585858, 0x595959, 0x5A5A5A, 0x5B5B5B, 0x5C5C5C, 0x5D5D5D, 0x5E5E5E, 0x5F5F5F,
0x606060, 0x616161, 0x626262, 0x636363, 0x646464, 0x656565, 0x666666, 0x676767,
0x686868, 0x696969, 0x6A6A6A, 0x6B6B6B, 0x6C6C6C, 0x6D6D6D, 0x6E6E6E, 0x6F6F6F,
0x707070, 0x717171, 0x727272, 0x737373, 0x747474, 0x757575, 0x767676, 0x777777,
0x787878, 0x797979, 0x7A7A7A, 0x7B7B7B, 0x7C7C7C, 0x7D7D7D, 0x7E7E7E, 0x7F7F7F,
0x808080, 0x818181, 0x828282, 0x838383, 0x848484, 0x858585, 0x868686, 0x878787,
0x888888, 0x898989, 0x8A8A8A, 0x8B8B8B, 0x8C8C8C, 0x8D8D8D, 0x8E8E8E, 0x8F8F8F,
0x909090, 0x919191, 0x929292, 0x939393, 0x949494, 0x959595, 0x969696, 0x979797,
0x989898, 0x999999, 0x9A9A9A, 0x9B9B9B, 0x9C9C9C, 0x9D9D9D, 0x9E9E9E, 0x9F9F9F,
0xA0A0A0, 0xA1A1A1, 0xA2A2A2, 0xA3A3A3, 0xA4A4A4, 0xA5A5A5, 0xA6A6A6, 0xA7A7A7,
0xA8A8A8, 0xA9A9A9, 0xAAAAAA, 0xABABAB, 0xACACAC, 0xADADAD, 0xAEAEAE, 0xAFAFAF,
0xB0B0B0, 0xB1B1B1, 0xB2B2B2, 0xB3B3B3, 0xB4B4B4, 0xB5B5B5, 0xB6B6B6, 0xB7B7B7,
0xB8B8B8, 0xB9B9B9, 0xBABABA, 0xBBBBBB, 0xBCBCBC, 0xBDBDBD, 0xBEBEBE, 0xBFBFBF,
0xC0C0C0, 0xC1C1C1, 0xC2C2C2, 0xC3C3C3, 0xC4C4C4, 0xC5C5C5, 0xC6C6C6, 0xC7C7C7,
0xC8C8C8, 0xC9C9C9, 0xCACACA, 0xCBCBCB, 0xCCCCCC, 0xCDCDCD, 0xCECECE, 0xCFCFCF,
0xD0D0D0, 0xD1D1D1, 0xD2D2D2, 0xD3D3D3, 0xD4D4D4, 0xD5D5D5, 0xD6D6D6, 0xD7D7D7,
0xD8D8D8, 0xD9D9D9, 0xDADADA, 0xDBDBDB, 0xDCDCDC, 0xDDDDDD, 0xDEDEDE, 0xDFDFDF,
0xE0E0E0, 0xE1E1E1, 0xE2E2E2, 0xE3E3E3, 0xE4E4E4, 0xE5E5E5, 0xE6E6E6, 0xE7E7E7,
0xE8E8E8, 0xE9E9E9, 0xEAEAEA, 0xEBEBEB, 0xECECEC, 0xEDEDED, 0xEEEEEE, 0xEFEFEF,
0xF0F0F0, 0xF1F1F1, 0xF2F2F2, 0xF3F3F3, 0xF4F4F4, 0xF5F5F5, 0xF6F6F6, 0xF7F7F7,
0xF8F8F8, 0xF9F9F9, 0xFAFAFA, 0xFBFBFB, 0xFCFCFC, 0xFDFDFD, 0xFEFEFE, 0xFFFFFF};

const unsigned Colormap::jet[] = {
0x00007F, 0x000083, 0x000087, 0x00008B, 0x00008F, 0x000093, 0x000097, 0x00009B,
0x00009F, 0x0000A3, 0x0000A7, 0x0000AB, 0x0000AF, 0x0000B3, 0x0000B7, 0x0000BB,
0x0000BF, 0x0000C3, 0x0000C7, 0x0000CB, 0x0000CF, 0x0000D3, 0x0000D7, 0x0000DB,
0x0000DF, 0x0000E3, 0x0000E7, 0x0000EB, 0x0000EF, 0x0000F3, 0x0000F7, 0x0000FB,
0x0000FF, 0x0004FF, 0x0008FF, 0x000CFF, 0x0010FF, 0x0014FF, 0x0018FF, 0x001CFF,
0x0020FF, 0x0024FF, 0x0028FF, 0x002CFF, 0x0030FF, 0x0034FF, 0x0038FF, 0x003CFF,
0x0040FF, 0x0044FF, 0x0048FF, 0x004CFF, 0x0050FF, 0x0054FF, 0x0058FF, 0x005CFF,
0x0060FF, 0x0064FF, 0x0068FF, 0x006CFF, 0x0070FF, 0x0074FF, 0x0078FF, 0x007CFF,
0x0080FF, 0x0084FF, 0x0088FF, 0x008CFF, 0x0090FF, 0x0094FF, 0x0098FF, 0x009CFF,
0x00A0FF, 0x00A4FF, 0x00A8FF, 0x00ACFF, 0x00B0FF, 0x00B4FF, 0x00B8FF, 0x00BCFF,
0x00C0FF, 0x00C4FF, 0x00C8FF, 0x00CCFF, 0x00D0FF, 0x00D4FF, 0x00D8FF, 0x00DCFF,
0x00E0FF, 0x00E4FF, 0x00E8FF, 0x00ECFF, 0x00F0FF, 0x00F4FF, 0x00F8FF, 0x00FCFF,
0x01FFFD, 0x05FFF9, 0x09FFF5, 0x0DFFF1, 0x11FFED, 0x15FFE9, 0x19FFE5, 0x1DFFE1,
0x21FFDD, 0x25FFD9, 0x29FFD5, 0x2DFFD1, 0x31FFCD, 0x35FFC9, 0x39FFC5, 0x3DFFC1,
0x41FFBD, 0x45FFB9, 0x49FFB5, 0x4DFFB1, 0x51FFAD, 0x55FFA9, 0x59FFA5, 0x5DFFA1,
0x61FF9D, 0x65FF99, 0x69FF95, 0x6DFF91, 0x71FF8D, 0x75FF89, 0x79FF85, 0x7DFF81,
0x81FF7D, 0x85FF79, 0x89FF75, 0x8DFF71, 0x91FF6D, 0x95FF69, 0x99FF65, 0x9DFF61,
0xA1FF5D, 0xA5FF59, 0xA9FF55, 0xADFF51, 0xB1FF4D, 0xB5FF49, 0xB9FF45, 0xBDFF41,
0xC1FF3D, 0xC5FF39, 0xC9FF35, 0xCDFF31, 0xD1FF2D, 0xD5FF29, 0xD9FF25, 0xDDFF21,
0xE1FF1D, 0xE5FF19, 0xE9FF15, 0xEDFF11, 0xF1FF0D, 0xF5FF09, 0xF9FF05, 0xFDFF01,
0xFFFC00, 0xFFF800, 0xFFF400, 0xFFF000, 0xFFEC00, 0xFFE800, 0xFFE400, 0xFFE000,
0xFFDC00, 0xFFD800, 0xFFD400, 0xFFD000, 0xFFCC00, 0xFFC800, 0xFFC400, 0xFFC000,
0xFFBC00, 0xFFB800, 0xFFB400, 0xFFB000, 0xFFAC00, 0xFFA800, 0xFFA400, 0xFFA000,
0xFF9C00, 0xFF9800, 0xFF9400, 0xFF9000, 0xFF8C00, 0xFF8800, 0xFF8400, 0xFF8000,
0xFF7C00, 0xFF7800, 0xFF7400, 0xFF7000, 0xFF6C00, 0xFF6800, 0xFF6400, 0xFF6000,
0xFF5C00, 0xFF5800, 0xFF5400, 0xFF5000, 0xFF4C00, 0xFF4800, 0xFF4400, 0xFF4000,
0xFF3C00, 0xFF3800, 0xFF3400, 0xFF3000, 0xFF2C00, 0xFF2800, 0xFF2400, 0xFF2000,
0xFF1C00, 0xFF1800, 0xFF1400, 0xFF1000, 0xFF0C00, 0xFF0800, 0xFF0400, 0xFF0000,
0xFB0000, 0xF70000, 0xF30000, 0xEF0000, 0xEB0000, 0xE70000, 0xE30000, 0xDF0000,
0xDB0000, 0xD70000, 0xD30000, 0xCF0000, 0xCB0000, 0xC70000, 0xC30000, 0xBF0000,
0xBB0000, 0xB70000, 0xB30000, 0xAF0000, 0xAB0000, 0xA70000, 0xA30000, 0x9F0000,
0x9B0000, 0x970000, 0x930000, 0x8F0000, 0x8B0000, 0x870000, 0x830000, 0x7F0000};

const unsigned Colormap::hsv[] = {
0xFF0000, 0xFF0600, 0xFF0C00, 0xFF1200, 0xFF1800, 0xFF1E00, 0xFF2400, 0xFF2A00,
0xFF3000, 0xFF3600, 0xFF3C00, 0xFF4100, 0xFF4800, 0xFF4E00, 0xFF5400, 0xFF5900,
0xFF6000, 0xFF6600, 0xFF6C00, 0xFF7100, 0xFF7800, 0xFF7E00, 0xFF8300, 0xFF8A00,
0xFF9000, 0xFF9600, 0xFF9C00, 0xFFA200, 0xFFA800, 0xFFAE00, 0xFFB300, 0xFFBA00,
0xFFC000, 0xFFC500, 0xFFCC00, 0xFFD200, 0xFFD800, 0xFFDD00, 0xFFE300, 0xFFEA00,
0xFFF000, 0xFFF500, 0xFFFC00, 0xFCFF00, 0xF6FF00, 0xF0FF00, 0xE9FF00, 0xE3FF00,
0xDDFF00, 0xD7FF00, 0xD1FF00, 0xCBFF00, 0xC5FF00, 0xBFFF00, 0xB9FF00, 0xB3FF00,
0xADFF00, 0xA7FF00, 0xA2FF00, 0x9CFF00, 0x96FF00, 0x90FF00, 0x89FF00, 0x83FF00,
0x7EFF00, 0x78FF00, 0x72FF00, 0x6BFF00, 0x65FF00, 0x5FFF00, 0x59FF00, 0x53FF00,
0x4DFF00, 0x47FF00, 0x41FF00, 0x3CFF00, 0x36FF00, 0x30FF00, 0x29FF00, 0x23FF00,
0x1DFF00, 0x17FF00, 0x11FF00, 0x0BFF00, 0x05FF00, 0x00FF00, 0x00FF06, 0x00FF0C,
0x00FF12, 0x00FF18, 0x00FF1D, 0x00FF24, 0x00FF2A, 0x00FF30, 0x00FF36, 0x00FF3C,
0x00FF42, 0x00FF48, 0x00FF4D, 0x00FF54, 0x00FF5A, 0x00FF60, 0x00FF66, 0x00FF6C,
0x00FF72, 0x00FF78, 0x00FF7D, 0x00FF84, 0x00FF8A, 0x00FF90, 0x00FF96, 0x00FF9C,
0x00FFA2, 0x00FFA8, 0x00FFAD, 0x00FFB4, 0x00FFBA, 0x00FFC0, 0x00FFC6, 0x00FFCC,
0x00FFD2, 0x00FFD8, 0x00FFDD, 0x00FFE4, 0x00FFEA, 0x00FFF0, 0x00FFF6, 0x00FFFC,
0x00FCFF, 0x00F6FF, 0x00F0FF, 0x00EAFF, 0x00E4FF, 0x00DDFF, 0x00D7FF, 0x00D1FF,
0x00CBFF, 0x00C5FF, 0x00C0FF, 0x00BAFF, 0x00B3FF, 0x00ADFF, 0x00A7FF, 0x00A2FF,
0x009CFF, 0x0096FF, 0x0090FF, 0x008AFF, 0x0084FF, 0x007EFF, 0x0078FF, 0x0072FF,
0x006CFF, 0x0066FF, 0x0060FF, 0x005AFF, 0x0053FF, 0x004DFF, 0x0047FF, 0x0041FF,
0x003CFF, 0x0036FF, 0x0030FF, 0x002AFF, 0x0024FF, 0x001DFF, 0x0017FF, 0x0011FF,
0x000BFF, 0x0005FF, 0x0000FF, 0x0500FF, 0x0C00FF, 0x1200FF, 0x1800FF, 0x1E00FF,
0x2400FF, 0x2A00FF, 0x3000FF, 0x3500FF, 0x3B00FF, 0x4200FF, 0x4800FF, 0x4E00FF,
0x5400FF, 0x5A00FF, 0x6000FF, 0x6500FF, 0x6C00FF, 0x7200FF, 0x7800FF, 0x7E00FF,
0x8400FF, 0x8A00FF, 0x9000FF, 0x9500FF, 0x9B00FF, 0xA200FF, 0xA800FF, 0xAE00FF,
0xB400FF, 0xBA00FF, 0xC000FF, 0xC500FF, 0xCC00FF, 0xD200FF, 0xD800FF, 0xDE00FF,
0xE400FF, 0xEA00FF, 0xF000FF, 0xF500FF, 0xFB00FF, 0xFF00FC, 0xFF00F6, 0xFF00F0,
0xFF00EA, 0xFF00E4, 0xFF00DE, 0xFF00D8, 0xFF00D1, 0xFF00CB, 0xFF00C5, 0xFF00BF,
0xFF00B9, 0xFF00B3, 0xFF00AD, 0xFF00A7, 0xFF00A2, 0xFF009C, 0xFF0096, 0xFF0090,
0xFF008A, 0xFF0084, 0xFF007E, 0xFF0078, 0xFF0071, 0xFF006B, 0xFF0065, 0xFF005F,
0xFF0059, 0xFF0053, 0xFF004D, 0xFF0047, 0xFF0041, 0xFF003C, 0xFF0036, 0xFF0030,
0xFF002A, 0xFF0024, 0xFF001E, 0xFF0018, 0xFF0011, 0xFF000B, 0xFF0005, 0xFF0000};

const unsigned Colormap::hot[] = {
0x000000, 0x020000, 0x050000, 0x070000, 0x0A0000, 0x0C0000, 0x0F0000, 0x110000,
0x140000, 0x160000, 0x190000, 0x1B0000, 0x1E0000, 0x200000, 0x230000, 0x250000,
0x280000, 0x2A0000, 0x2C0000, 0x2F0000, 0x320000, 0x340000, 0x370000, 0x390000,
0x3C0000, 0x3E0000, 0x410000, 0x430000, 0x460000, 0x480000, 0x4B0000, 0x4D0000,
0x500000, 0x520000, 0x550000, 0x570000, 0x590000, 0x5C0000, 0x5F0000, 0x610000,
0x640000, 0x660000, 0x690000, 0x6B0000, 0x6E0000, 0x700000, 0x730000, 0x750000,
0x780000, 0x7A0000, 0x7D0000, 0x7F0000, 0x820000, 0x840000, 0x870000, 0x890000,
0x8C0000, 0x8E0000, 0x910000, 0x930000, 0x960000, 0x980000, 0x9B0000, 0x9D0000,
0xA00000, 0xA20000, 0xA40000, 0xA70000, 0xAA0000, 0xAC0000, 0xAF0000, 0xB10000,
0xB30000, 0xB60000, 0xB80000, 0xBB0000, 0xBE0000, 0xC00000, 0xC30000, 0xC50000,
0xC80000, 0xCA0000, 0xCC0000, 0xCF0000, 0xD20000, 0xD40000, 0xD70000, 0xD90000,
0xDC0000, 0xDE0000, 0xE10000, 0xE30000, 0xE60000, 0xE80000, 0xEB0000, 0xED0000,
0xF00000, 0xF20000, 0xF40000, 0xF70000, 0xFA0000, 0xFC0000, 0xFF0000, 0xFF0200,
0xFF0400, 0xFF0700, 0xFF0900, 0xFF0C00, 0xFF0F00, 0xFF1100, 0xFF1400, 0xFF1600,
0xFF1900, 0xFF1B00, 0xFF1E00, 0xFF2000, 0xFF2200, 0xFF2500, 0xFF2800, 0xFF2A00,
0xFF2D00, 0xFF2F00, 0xFF3100, 0xFF3400, 0xFF3600, 0xFF3900, 0xFF3C00, 0xFF3E00,
0xFF4100, 0xFF4300, 0xFF4500, 0xFF4800, 0xFF4A00, 0xFF4D00, 0xFF5000, 0xFF5200,
0xFF5400, 0xFF5700, 0xFF5900, 0xFF5C00, 0xFF5F00, 0xFF6100, 0xFF6300, 0xFF6600,
0xFF6800, 0xFF6B00, 0xFF6D00, 0xFF7000, 0xFF7200, 0xFF7500, 0xFF7800, 0xFF7A00,
0xFF7D00, 0xFF7F00, 0xFF8200, 0xFF8400, 0xFF8700, 0xFF8900, 0xFF8C00, 0xFF8E00,
0xFF9100, 0xFF9300, 0xFF9500, 0xFF9800, 0xFF9A00, 0xFF9D00, 0xFFA000, 0xFFA200,
0xFFA400, 0xFFA700, 0xFFA900, 0xFFAC00, 0xFFAF00, 0xFFB100, 0xFFB400, 0xFFB600,
0xFFB900, 0xFFBB00, 0xFFBE00, 0xFFC000, 0xFFC300, 0xFFC500, 0xFFC800, 0xFFCA00,
0xFFCD00, 0xFFCF00, 0xFFD200, 0xFFD400, 0xFFD700, 0xFFD900, 0xFFDC00, 0xFFDE00,
0xFFE100, 0xFFE300, 0xFFE500, 0xFFE800, 0xFFEA00, 0xFFED00, 0xFFF000, 0xFFF200,
0xFFF400, 0xFFF700, 0xFFF900, 0xFFFC00, 0xFFFF00, 0xFFFF04, 0xFFFF09, 0xFFFF0E,
0xFFFF13, 0xFFFF18, 0xFFFF1D, 0xFFFF22, 0xFFFF27, 0xFFFF2D, 0xFFFF32, 0xFFFF37,
0xFFFF3C, 0xFFFF41, 0xFFFF45, 0xFFFF4A, 0xFFFF50, 0xFFFF55, 0xFFFF5A, 0xFFFF5F,
0xFFFF64, 0xFFFF69, 0xFFFF6E, 0xFFFF73, 0xFFFF78, 0xFFFF7D, 0xFFFF82, 0xFFFF86,
0xFFFF8B, 0xFFFF90, 0xFFFF95, 0xFFFF9A, 0xFFFFA0, 0xFFFFA5, 0xFFFFAA, 0xFFFFAF,
0xFFFFB4, 0xFFFFB9, 0xFFFFBE, 0xFFFFC3, 0xFFFFC7, 0xFFFFCC, 0xFFFFD1, 0xFFFFD6,
0xFFFFDB, 0xFFFFE0, 0xFFFFE5, 0xFFFFEA, 0xFFFFF0, 0xFFFFF5, 0xFFFFFA, 0xFFFFFF};

const unsigned Colormap::cool[] = {
0x00FFFF, 0x01FEFF, 0x02FDFF, 0x03FCFF, 0x04FBFF, 0x05FAFF, 0x06F9FF, 0x07F8FF,
0x08F7FF, 0x09F6FF, 0x0AF5FF, 0x0BF4FF, 0x0CF3FF, 0x0DF2FF, 0x0EF1FF, 0x0FF0FF,
0x10EFFF, 0x11EEFF, 0x12EDFF, 0x13ECFF, 0x14EBFF, 0x15EAFF, 0x16E9FF, 0x17E8FF,
0x18E7FF, 0x19E6FF, 0x1AE5FF, 0x1BE4FF, 0x1CE3FF, 0x1DE2FF, 0x1EE1FF, 0x1FE0FF,
0x20DFFF, 0x21DEFF, 0x22DDFF, 0x23DCFF, 0x24DBFF, 0x25DAFF, 0x26D9FF, 0x27D8FF,
0x28D7FF, 0x29D6FF, 0x2AD5FF, 0x2BD3FF, 0x2CD3FF, 0x2DD2FF, 0x2ED1FF, 0x2FD0FF,
0x30CFFF, 0x31CEFF, 0x32CDFF, 0x33CCFF, 0x34CBFF, 0x35CAFF, 0x36C9FF, 0x37C8FF,
0x38C7FF, 0x39C6FF, 0x3AC5FF, 0x3BC3FF, 0x3CC3FF, 0x3DC2FF, 0x3EC1FF, 0x3FC0FF,
0x40BFFF, 0x41BEFF, 0x42BDFF, 0x43BCFF, 0x44BBFF, 0x45BAFF, 0x46B9FF, 0x47B8FF,
0x48B7FF, 0x49B6FF, 0x4AB4FF, 0x4BB3FF, 0x4CB3FF, 0x4DB2FF, 0x4EB1FF, 0x4FB0FF,
0x50AFFF, 0x51AEFF, 0x52ADFF, 0x53ACFF, 0x54ABFF, 0x55AAFF, 0x56A9FF, 0x57A8FF,
0x58A7FF, 0x59A6FF, 0x5AA4FF, 0x5BA3FF, 0x5CA3FF, 0x5DA2FF, 0x5EA1FF, 0x5FA0FF,
0x609FFF, 0x619EFF, 0x629DFF, 0x639CFF, 0x649BFF, 0x659AFF, 0x6699FF, 0x6798FF,
0x6897FF, 0x6996FF, 0x6A94FF, 0x6B93FF, 0x6C93FF, 0x6D92FF, 0x6E91FF, 0x6F90FF,
0x708FFF, 0x718EFF, 0x728DFF, 0x738CFF, 0x748BFF, 0x758AFF, 0x7689FF, 0x7788FF,
0x7887FF, 0x7986FF, 0x7A84FF, 0x7B83FF, 0x7C83FF, 0x7D82FF, 0x7E81FF, 0x7F80FF,
0x807FFF, 0x817EFF, 0x827DFF, 0x837CFF, 0x847AFF, 0x8579FF, 0x8679FF, 0x8778FF,
0x8877FF, 0x8976FF, 0x8A75FF, 0x8B74FF, 0x8C72FF, 0x8D71FF, 0x8E71FF, 0x8F70FF,
0x906FFF, 0x916EFF, 0x926DFF, 0x936CFF, 0x946AFF, 0x9569FF, 0x9669FF, 0x9768FF,
0x9867FF, 0x9966FF, 0x9A65FF, 0x9B64FF, 0x9C62FF, 0x9D61FF, 0x9E61FF, 0x9F60FF,
0xA05FFF, 0xA15EFF, 0xA25DFF, 0xA35CFF, 0xA45AFF, 0xA559FF, 0xA659FF, 0xA758FF,
0xA857FF, 0xA956FF, 0xAA55FF, 0xAB54FF, 0xAC52FF, 0xAD51FF, 0xAE51FF, 0xAF50FF,
0xB04FFF, 0xB14EFF, 0xB24DFF, 0xB34CFF, 0xB44AFF, 0xB549FF, 0xB649FF, 0xB748FF,
0xB847FF, 0xB946FF, 0xBA45FF, 0xBB44FF, 0xBC42FF, 0xBD41FF, 0xBE41FF, 0xBF40FF,
0xC03FFF, 0xC13EFF, 0xC23DFF, 0xC33CFF, 0xC43AFF, 0xC539FF, 0xC638FF, 0xC738FF,
0xC837FF, 0xC936FF, 0xCA35FF, 0xCB34FF, 0xCC32FF, 0xCD31FF, 0xCE30FF, 0xCF30FF,
0xD02FFF, 0xD12EFF, 0xD22DFF, 0xD32CFF, 0xD42AFF, 0xD529FF, 0xD628FF, 0xD728FF,
0xD827FF, 0xD926FF, 0xDA25FF, 0xDB24FF, 0xDC22FF, 0xDD21FF, 0xDE20FF, 0xDF20FF,
0xE01FFF, 0xE11EFF, 0xE21DFF, 0xE31CFF, 0xE41AFF, 0xE519FF, 0xE618FF, 0xE718FF,
0xE817FF, 0xE916FF, 0xEA15FF, 0xEB14FF, 0xEC12FF, 0xED11FF, 0xEE10FF, 0xEF10FF,
0xF00FFF, 0xF10EFF, 0xF20DFF, 0xF30CFF, 0xF40AFF, 0xF509FF, 0xF608FF, 0xF708FF,
0xF807FF, 0xF906FF, 0xFA05FF, 0xFB04FF, 0xFC02FF, 0xFD01FF, 0xFE00FF, 0xFF00FF};

const unsigned Colormap::spring[] = {
0xFF00FF, 0xFF01FE, 0xFF02FD, 0xFF03FC, 0xFF04FB, 0xFF05FA, 0xFF06F9, 0xFF07F8,
0xFF08F7, 0xFF09F6, 0xFF0AF5, 0xFF0BF4, 0xFF0CF3, 0xFF0DF2, 0xFF0EF1, 0xFF0FF0,
0xFF10EF, 0xFF11EE, 0xFF12ED, 0xFF13EC, 0xFF14EB, 0xFF15EA, 0xFF16E9, 0xFF17E8,
0xFF18E7, 0xFF19E6, 0xFF1AE5, 0xFF1BE4, 0xFF1CE3, 0xFF1DE2, 0xFF1EE1, 0xFF1FE0,
0xFF20DF, 0xFF21DE, 0xFF22DD, 0xFF23DC, 0xFF24DB, 0xFF25DA, 0xFF26D9, 0xFF27D8,
0xFF28D7, 0xFF29D6, 0xFF2AD5, 0xFF2BD3, 0xFF2CD3, 0xFF2DD2, 0xFF2ED1, 0xFF2FD0,
0xFF30CF, 0xFF31CE, 0xFF32CD, 0xFF33CC, 0xFF34CB, 0xFF35CA, 0xFF36C9, 0xFF37C8,
0xFF38C7, 0xFF39C6, 0xFF3AC5, 0xFF3BC3, 0xFF3CC3, 0xFF3DC2, 0xFF3EC1, 0xFF3FC0,
0xFF40BF, 0xFF41BE, 0xFF42BD, 0xFF43BC, 0xFF44BB, 0xFF45BA, 0xFF46B9, 0xFF47B8,
0xFF48B7, 0xFF49B6, 0xFF4AB4, 0xFF4BB3, 0xFF4CB3, 0xFF4DB2, 0xFF4EB1, 0xFF4FB0,
0xFF50AF, 0xFF51AE, 0xFF52AD, 0xFF53AC, 0xFF54AB, 0xFF55AA, 0xFF56A9, 0xFF57A8,
0xFF58A7, 0xFF59A6, 0xFF5AA4, 0xFF5BA3, 0xFF5CA3, 0xFF5DA2, 0xFF5EA1, 0xFF5FA0,
0xFF609F, 0xFF619E, 0xFF629D, 0xFF639C, 0xFF649B, 0xFF659A, 0xFF6699, 0xFF6798,
0xFF6897, 0xFF6996, 0xFF6A94, 0xFF6B93, 0xFF6C93, 0xFF6D92, 0xFF6E91, 0xFF6F90,
0xFF708F, 0xFF718E, 0xFF728D, 0xFF738C, 0xFF748B, 0xFF758A, 0xFF7689, 0xFF7788,
0xFF7887, 0xFF7986, 0xFF7A84, 0xFF7B83, 0xFF7C83, 0xFF7D82, 0xFF7E81, 0xFF7F80,
0xFF807F, 0xFF817E, 0xFF827D, 0xFF837C, 0xFF847A, 0xFF8579, 0xFF8679, 0xFF8778,
0xFF8877, 0xFF8976, 0xFF8A75, 0xFF8B74, 0xFF8C72, 0xFF8D71, 0xFF8E71, 0xFF8F70,
0xFF906F, 0xFF916E, 0xFF926D, 0xFF936C, 0xFF946A, 0xFF9569, 0xFF9669, 0xFF9768,
0xFF9867, 0xFF9966, 0xFF9A65, 0xFF9B64, 0xFF9C62, 0xFF9D61, 0xFF9E61, 0xFF9F60,
0xFFA05F, 0xFFA15E, 0xFFA25D, 0xFFA35C, 0xFFA45A, 0xFFA559, 0xFFA659, 0xFFA758,
0xFFA857, 0xFFA956, 0xFFAA55, 0xFFAB54, 0xFFAC52, 0xFFAD51, 0xFFAE51, 0xFFAF50,
0xFFB04F, 0xFFB14E, 0xFFB24D, 0xFFB34C, 0xFFB44A, 0xFFB549, 0xFFB649, 0xFFB748,
0xFFB847, 0xFFB946, 0xFFBA45, 0xFFBB44, 0xFFBC42, 0xFFBD41, 0xFFBE41, 0xFFBF40,
0xFFC03F, 0xFFC13E, 0xFFC23D, 0xFFC33C, 0xFFC43A, 0xFFC539, 0xFFC638, 0xFFC738,
0xFFC837, 0xFFC936, 0xFFCA35, 0xFFCB34, 0xFFCC32, 0xFFCD31, 0xFFCE30, 0xFFCF30,
0xFFD02F, 0xFFD12E, 0xFFD22D, 0xFFD32C, 0xFFD42A, 0xFFD529, 0xFFD628, 0xFFD728,
0xFFD827, 0xFFD926, 0xFFDA25, 0xFFDB24, 0xFFDC22, 0xFFDD21, 0xFFDE20, 0xFFDF20,
0xFFE01F, 0xFFE11E, 0xFFE21D, 0xFFE31C, 0xFFE41A, 0xFFE519, 0xFFE618, 0xFFE718,
0xFFE817, 0xFFE916, 0xFFEA15, 0xFFEB14, 0xFFEC12, 0xFFED11, 0xFFEE10, 0xFFEF10,
0xFFF00F, 0xFFF10E, 0xFFF20D, 0xFFF30C, 0xFFF40A, 0xFFF509, 0xFFF608, 0xFFF708,
0xFFF807, 0xFFF906, 0xFFFA05, 0xFFFB04, 0xFFFC02, 0xFFFD01, 0xFFFE00, 0xFFFF00};

const unsigned Colormap::summer[] = {
0x007F66, 0x018066, 0x028066, 0x038166, 0x048166, 0x058266, 0x068266, 0x078366,
0x088366, 0x098466, 0x0A8466, 0x0B8566, 0x0C8566, 0x0D8666, 0x0E8666, 0x0F8766,
0x108766, 0x118866, 0x128866, 0x138966, 0x148966, 0x158A66, 0x168A66, 0x178B66,
0x188B66, 0x198C66, 0x1A8C66, 0x1B8D66, 0x1C8D66, 0x1D8E66, 0x1E8E66, 0x1F8F66,
0x208F66, 0x219066, 0x229066, 0x239166, 0x249166, 0x259266, 0x269266, 0x279366,
0x289366, 0x299466, 0x2A9466, 0x2B9566, 0x2C9566, 0x2D9666, 0x2E9666, 0x2F9766,
0x309766, 0x319866, 0x329866, 0x339966, 0x349966, 0x359A66, 0x369A66, 0x379B66,
0x389B66, 0x399C66, 0x3A9C66, 0x3B9D66, 0x3C9D66, 0x3D9E66, 0x3E9E66, 0x3F9F66,
0x409F66, 0x41A066, 0x42A066, 0x43A166, 0x44A166, 0x45A266, 0x46A266, 0x47A366,
0x48A366, 0x49A366, 0x4AA466, 0x4BA566, 0x4CA566, 0x4DA666, 0x4EA666, 0x4FA766,
0x50A766, 0x51A866, 0x52A866, 0x53A966, 0x54A966, 0x55AA66, 0x56AA66, 0x57AB66,
0x58AB66, 0x59AC66, 0x5AAC66, 0x5BAD66, 0x5CAD66, 0x5DAE66, 0x5EAE66, 0x5FAF66,
0x60AF66, 0x61B066, 0x62B066, 0x63B166, 0x64B166, 0x65B266, 0x66B266, 0x67B366,
0x68B366, 0x69B366, 0x6AB466, 0x6BB566, 0x6CB566, 0x6DB666, 0x6EB666, 0x6FB766,
0x70B766, 0x71B866, 0x72B866, 0x73B966, 0x74B966, 0x75BA66, 0x76BA66, 0x77BB66,
0x78BB66, 0x79BC66, 0x7ABC66, 0x7BBD66, 0x7CBD66, 0x7DBE66, 0x7EBE66, 0x7FBF66,
0x80BF66, 0x81C066, 0x82C066, 0x83C166, 0x84C166, 0x85C266, 0x86C266, 0x87C366,
0x88C366, 0x89C366, 0x8AC466, 0x8BC466, 0x8CC566, 0x8DC666, 0x8EC666, 0x8FC766,
0x90C766, 0x91C866, 0x92C866, 0x93C966, 0x94C966, 0x95CA66, 0x96CA66, 0x97CB66,
0x98CB66, 0x99CC66, 0x9ACC66, 0x9BCD66, 0x9CCD66, 0x9DCE66, 0x9ECE66, 0x9FCF66,
0xA0CF66, 0xA1D066, 0xA2D066, 0xA3D166, 0xA4D166, 0xA5D266, 0xA6D266, 0xA7D366,
0xA8D366, 0xA9D366, 0xAAD466, 0xABD466, 0xACD566, 0xADD666, 0xAED666, 0xAFD766,
0xB0D766, 0xB1D866, 0xB2D866, 0xB3D966, 0xB4D966, 0xB5DA66, 0xB6DA66, 0xB7DB66,
0xB8DB66, 0xB9DC66, 0xBADC66, 0xBBDD66, 0xBCDD66, 0xBDDE66, 0xBEDE66, 0xBFDF66,
0xC0DF66, 0xC1E066, 0xC2E066, 0xC3E166, 0xC4E166, 0xC5E266, 0xC6E266, 0xC7E366,
0xC8E366, 0xC9E366, 0xCAE466, 0xCBE466, 0xCCE566, 0xCDE666, 0xCEE666, 0xCFE766,
0xD0E766, 0xD1E866, 0xD2E866, 0xD3E966, 0xD4E966, 0xD5EA66, 0xD6EA66, 0xD7EB66,
0xD8EB66, 0xD9EC66, 0xDAEC66, 0xDBED66, 0xDCED66, 0xDDEE66, 0xDEEE66, 0xDFEF66,
0xE0EF66, 0xE1F066, 0xE2F066, 0xE3F166, 0xE4F166, 0xE5F266, 0xE6F266, 0xE7F366,
0xE8F366, 0xE9F366, 0xEAF466, 0xEBF466, 0xECF566, 0xEDF666, 0xEEF666, 0xEFF766,
0xF0F766, 0xF1F866, 0xF2F866, 0xF3F966, 0xF4F966, 0xF5FA66, 0xF6FA66, 0xF7FB66,
0xF8FB66, 0xF9FC66, 0xFAFC66, 0xFBFD66, 0xFCFD66, 0xFDFE66, 0xFEFE66, 0xFFFF66};

const unsigned Colormap::autumn[] = {
0xFF0000, 0xFF0100, 0xFF0200, 0xFF0300, 0xFF0400, 0xFF0500, 0xFF0600, 0xFF0700,
0xFF0800, 0xFF0900, 0xFF0A00, 0xFF0B00, 0xFF0C00, 0xFF0D00, 0xFF0E00, 0xFF0F00,
0xFF1000, 0xFF1100, 0xFF1200, 0xFF1300, 0xFF1400, 0xFF1500, 0xFF1600, 0xFF1700,
0xFF1800, 0xFF1900, 0xFF1A00, 0xFF1B00, 0xFF1C00, 0xFF1D00, 0xFF1E00, 0xFF1F00,
0xFF2000, 0xFF2100, 0xFF2200, 0xFF2300, 0xFF2400, 0xFF2500, 0xFF2600, 0xFF2700,
0xFF2800, 0xFF2900, 0xFF2A00, 0xFF2B00, 0xFF2C00, 0xFF2D00, 0xFF2E00, 0xFF2F00,
0xFF3000, 0xFF3100, 0xFF3200, 0xFF3300, 0xFF3400, 0xFF3500, 0xFF3600, 0xFF3700,
0xFF3800, 0xFF3900, 0xFF3A00, 0xFF3B00, 0xFF3C00, 0xFF3D00, 0xFF3E00, 0xFF3F00,
0xFF4000, 0xFF4100, 0xFF4200, 0xFF4300, 0xFF4400, 0xFF4500, 0xFF4600, 0xFF4700,
0xFF4800, 0xFF4900, 0xFF4A00, 0xFF4B00, 0xFF4C00, 0xFF4D00, 0xFF4E00, 0xFF4F00,
0xFF5000, 0xFF5100, 0xFF5200, 0xFF5300, 0xFF5400, 0xFF5500, 0xFF5600, 0xFF5700,
0xFF5800, 0xFF5900, 0xFF5A00, 0xFF5B00, 0xFF5C00, 0xFF5D00, 0xFF5E00, 0xFF5F00,
0xFF6000, 0xFF6100, 0xFF6200, 0xFF6300, 0xFF6400, 0xFF6500, 0xFF6600, 0xFF6700,
0xFF6800, 0xFF6900, 0xFF6A00, 0xFF6B00, 0xFF6C00, 0xFF6D00, 0xFF6E00, 0xFF6F00,
0xFF7000, 0xFF7100, 0xFF7200, 0xFF7300, 0xFF7400, 0xFF7500, 0xFF7600, 0xFF7700,
0xFF7800, 0xFF7900, 0xFF7A00, 0xFF7B00, 0xFF7C00, 0xFF7D00, 0xFF7E00, 0xFF7F00,
0xFF8000, 0xFF8100, 0xFF8200, 0xFF8300, 0xFF8400, 0xFF8500, 0xFF8600, 0xFF8700,
0xFF8800, 0xFF8900, 0xFF8A00, 0xFF8B00, 0xFF8C00, 0xFF8D00, 0xFF8E00, 0xFF8F00,
0xFF9000, 0xFF9100, 0xFF9200, 0xFF9300, 0xFF9400, 0xFF9500, 0xFF9600, 0xFF9700,
0xFF9800, 0xFF9900, 0xFF9A00, 0xFF9B00, 0xFF9C00, 0xFF9D00, 0xFF9E00, 0xFF9F00,
0xFFA000, 0xFFA100, 0xFFA200, 0xFFA300, 0xFFA400, 0xFFA500, 0xFFA600, 0xFFA700,
0xFFA800, 0xFFA900, 0xFFAA00, 0xFFAB00, 0xFFAC00, 0xFFAD00, 0xFFAE00, 0xFFAF00,
0xFFB000, 0xFFB100, 0xFFB200, 0xFFB300, 0xFFB400, 0xFFB500, 0xFFB600, 0xFFB700,
0xFFB800, 0xFFB900, 0xFFBA00, 0xFFBB00, 0xFFBC00, 0xFFBD00, 0xFFBE00, 0xFFBF00,
0xFFC000, 0xFFC100, 0xFFC200, 0xFFC300, 0xFFC400, 0xFFC500, 0xFFC600, 0xFFC700,
0xFFC800, 0xFFC900, 0xFFCA00, 0xFFCB00, 0xFFCC00, 0xFFCD00, 0xFFCE00, 0xFFCF00,
0xFFD000, 0xFFD100, 0xFFD200, 0xFFD300, 0xFFD400, 0xFFD500, 0xFFD600, 0xFFD700,
0xFFD800, 0xFFD900, 0xFFDA00, 0xFFDB00, 0xFFDC00, 0xFFDD00, 0xFFDE00, 0xFFDF00,
0xFFE000, 0xFFE100, 0xFFE200, 0xFFE300, 0xFFE400, 0xFFE500, 0xFFE600, 0xFFE700,
0xFFE800, 0xFFE900, 0xFFEA00, 0xFFEB00, 0xFFEC00, 0xFFED00, 0xFFEE00, 0xFFEF00,
0xFFF000, 0xFFF100, 0xFFF200, 0xFFF300, 0xFFF400, 0xFFF500, 0xFFF600, 0xFFF700,
0xFFF800, 0xFFF900, 0xFFFA00, 0xFFFB00, 0xFFFC00, 0xFFFD00, 0xFFFE00, 0xFFFF00};

const unsigned Colormap::winter[] = {
0x0000FF, 0x0001FE, 0x0002FE, 0x0003FD, 0x0004FD, 0x0005FC, 0x0006FC, 0x0007FB,
0x0008FB, 0x0009FA, 0x000AFA, 0x000BF9, 0x000CF9, 0x000DF8, 0x000EF8, 0x000FF7,
0x0010F7, 0x0011F6, 0x0012F6, 0x0013F5, 0x0014F5, 0x0015F4, 0x0016F4, 0x0017F3,
0x0018F3, 0x0019F2, 0x001AF2, 0x001BF1, 0x001CF1, 0x001DF0, 0x001EF0, 0x001FEF,
0x0020EF, 0x0021EE, 0x0022EE, 0x0023ED, 0x0024ED, 0x0025EC, 0x0026EC, 0x0027EB,
0x0028EB, 0x0029EA, 0x002AEA, 0x002BE9, 0x002CE9, 0x002DE8, 0x002EE8, 0x002FE7,
0x0030E7, 0x0031E6, 0x0032E6, 0x0033E5, 0x0034E5, 0x0035E4, 0x0036E4, 0x0037E3,
0x0038E3, 0x0039E2, 0x003AE2, 0x003BE1, 0x003CE1, 0x003DE0, 0x003EE0, 0x003FDF,
0x0040DF, 0x0041DE, 0x0042DE, 0x0043DD, 0x0044DD, 0x0045DC, 0x0046DC, 0x0047DB,
0x0048DB, 0x0049DA, 0x004ADA, 0x004BD9, 0x004CD9, 0x004DD8, 0x004ED8, 0x004FD7,
0x0050D7, 0x0051D6, 0x0052D6, 0x0053D5, 0x0054D5, 0x0055D4, 0x0056D3, 0x0057D3,
0x0058D3, 0x0059D2, 0x005AD2, 0x005BD1, 0x005CD1, 0x005DD0, 0x005ED0, 0x005FCF,
0x0060CF, 0x0061CE, 0x0062CE, 0x0063CD, 0x0064CD, 0x0065CC, 0x0066CC, 0x0067CB,
0x0068CB, 0x0069CA, 0x006ACA, 0x006BC9, 0x006CC9, 0x006DC8, 0x006EC8, 0x006FC7,
0x0070C7, 0x0071C6, 0x0072C6, 0x0073C5, 0x0074C5, 0x0075C4, 0x0076C3, 0x0077C3,
0x0078C3, 0x0079C2, 0x007AC2, 0x007BC1, 0x007CC1, 0x007DC0, 0x007EC0, 0x007FBF,
0x0080BF, 0x0081BE, 0x0082BE, 0x0083BD, 0x0084BD, 0x0085BC, 0x0086BC, 0x0087BB,
0x0088BB, 0x0089BA, 0x008ABA, 0x008BB9, 0x008CB9, 0x008DB8, 0x008EB8, 0x008FB7,
0x0090B7, 0x0091B6, 0x0092B6, 0x0093B5, 0x0094B4, 0x0095B4, 0x0096B3, 0x0097B3,
0x0098B3, 0x0099B2, 0x009AB2, 0x009BB1, 0x009CB1, 0x009DB0, 0x009EB0, 0x009FAF,
0x00A0AF, 0x00A1AE, 0x00A2AE, 0x00A3AD, 0x00A4AD, 0x00A5AC, 0x00A6AC, 0x00A7AB,
0x00A8AB, 0x00A9AA, 0x00AAAA, 0x00ABA9, 0x00ACA9, 0x00ADA8, 0x00AEA8, 0x00AFA7,
0x00B0A7, 0x00B1A6, 0x00B2A6, 0x00B3A5, 0x00B4A4, 0x00B5A4, 0x00B6A3, 0x00B7A3,
0x00B8A3, 0x00B9A2, 0x00BAA2, 0x00BBA1, 0x00BCA1, 0x00BDA0, 0x00BEA0, 0x00BF9F,
0x00C09F, 0x00C19E, 0x00C29E, 0x00C39D, 0x00C49D, 0x00C59C, 0x00C69C, 0x00C79B,
0x00C89B, 0x00C99A, 0x00CA9A, 0x00CB99, 0x00CC99, 0x00CD98, 0x00CE98, 0x00CF97,
0x00D097, 0x00D196, 0x00D296, 0x00D395, 0x00D494, 0x00D594, 0x00D693, 0x00D793,
0x00D893, 0x00D992, 0x00DA92, 0x00DB91, 0x00DC91, 0x00DD90, 0x00DE90, 0x00DF8F,
0x00E08F, 0x00E18E, 0x00E28E, 0x00E38D, 0x00E48D, 0x00E58C, 0x00E68C, 0x00E78B,
0x00E88B, 0x00E98A, 0x00EA8A, 0x00EB89, 0x00EC89, 0x00ED88, 0x00EE88, 0x00EF87,
0x00F087, 0x00F186, 0x00F286, 0x00F385, 0x00F484, 0x00F584, 0x00F683, 0x00F783,
0x00F883, 0x00F982, 0x00FA82, 0x00FB81, 0x00FC81, 0x00FD80, 0x00FE80, 0x00FF7F};

const unsigned Colormap::bone[] = {
0x000000, 0x000001, 0x010102, 0x020203, 0x030304, 0x040406, 0x050507, 0x060608,
0x070709, 0x07070A, 0x08080C, 0x09090D, 0x0A0A0E, 0x0B0B0F, 0x0C0C10, 0x0D0D12,
0x0E0E13, 0x0E0E14, 0x0F0F15, 0x101016, 0x111118, 0x121219, 0x13131A, 0x14141B,
0x15151C, 0x15151E, 0x16161F, 0x171720, 0x181821, 0x191923, 0x1A1A24, 0x1B1B25,
0x1C1C26, 0x1C1C27, 0x1D1D29, 0x1E1E2A, 0x1F1F2B, 0x20202C, 0x21212D, 0x22222F,
0x232330, 0x232331, 0x242432, 0x252533, 0x262635, 0x272736, 0x282837, 0x292938,
0x2A2A39, 0x2A2A3B, 0x2B2B3C, 0x2C2C3D, 0x2D2D3E, 0x2E2E40, 0x2F2F41, 0x303042,
0x303043, 0x313144, 0x323246, 0x333347, 0x343448, 0x353549, 0x36364A, 0x37374C,
0x38384D, 0x38384E, 0x39394F, 0x3A3A50, 0x3B3B52, 0x3C3C53, 0x3D3D54, 0x3E3E55,
0x3F3F56, 0x3F3F58, 0x404059, 0x41415A, 0x42425B, 0x43435D, 0x44445E, 0x45455F,
0x464660, 0x464661, 0x474763, 0x484864, 0x494965, 0x4A4A66, 0x4B4B67, 0x4C4C69,
0x4D4D6A, 0x4D4D6B, 0x4E4E6C, 0x4F4F6D, 0x50506F, 0x515170, 0x525271, 0x535372,
0x545473, 0x545574, 0x555675, 0x565776, 0x575877, 0x585A78, 0x595B79, 0x5A5C7A,
0x5B5D7A, 0x5B5E7B, 0x5C607C, 0x5D617D, 0x5E627E, 0x5F637F, 0x606580, 0x616681,
0x616781, 0x626882, 0x636983, 0x646B84, 0x656C85, 0x666D86, 0x676E87, 0x686F88,
0x697188, 0x697289, 0x6A738A, 0x6B748B, 0x6C758C, 0x6D778D, 0x6E788E, 0x6F798F,
0x707A8F, 0x707B90, 0x717D91, 0x727E92, 0x737F93, 0x748094, 0x758295, 0x768396,
0x778496, 0x778597, 0x788698, 0x798899, 0x7A899A, 0x7B8A9B, 0x7C8B9C, 0x7D8C9D,
0x7E8E9D, 0x7E8F9E, 0x7F909F, 0x8091A0, 0x8192A1, 0x8294A2, 0x8395A3, 0x8496A4,
0x8597A4, 0x8599A5, 0x869AA6, 0x879BA7, 0x889CA8, 0x899DA9, 0x8A9FAA, 0x8BA0AB,
0x8CA1AB, 0x8CA2AC, 0x8DA3AD, 0x8EA5AE, 0x8FA6AF, 0x90A7B0, 0x91A8B1, 0x92A9B2,
0x93ABB2, 0x93ACB3, 0x94ADB4, 0x95AEB5, 0x96AFB6, 0x97B1B7, 0x98B2B8, 0x99B3B9,
0x9AB4B9, 0x9AB5BA, 0x9BB7BB, 0x9CB8BC, 0x9DB9BD, 0x9EBABE, 0x9FBCBF, 0xA0BDC0,
0xA1BEC0, 0xA1BFC1, 0xA2C0C2, 0xA3C2C3, 0xA4C3C4, 0xA5C4C5, 0xA6C5C6, 0xA7C6C7,
0xA8C7C7, 0xA9C8C8, 0xABC9C9, 0xACCACA, 0xADCBCB, 0xAFCCCC, 0xB0CDCD, 0xB2CECE,
0xB3CECE, 0xB4CFCF, 0xB6D0D0, 0xB7D1D1, 0xB8D2D2, 0xBAD3D3, 0xBBD4D4, 0xBDD5D5,
0xBED5D5, 0xBFD6D6, 0xC1D7D7, 0xC2D8D8, 0xC3D9D9, 0xC5DADA, 0xC6DBDB, 0xC8DCDC,
0xC9DCDC, 0xCADDDD, 0xCCDEDE, 0xCDDFDF, 0xCEE0E0, 0xD0E1E1, 0xD1E2E2, 0xD3E3E3,
0xD4E3E3, 0xD5E4E4, 0xD7E5E5, 0xD8E6E6, 0xD9E7E7, 0xDBE8E8, 0xDCE9E9, 0xDEEAEA,
0xDFEAEA, 0xE0EBEB, 0xE2ECEC, 0xE3EDED, 0xE4EEEE, 0xE6EFEF, 0xE7F0F0, 0xE9F1F1,
0xEAF1F1, 0xEBF2F2, 0xEDF3F3, 0xEEF4F4, 0xEFF5F5, 0xF1F6F6, 0xF2F7F7, 0xF3F8F8,
0xF5F8F8, 0xF6F9F9, 0xF8FAFA, 0xF9FBFB, 0xFAFCFC, 0xFCFDFD, 0xFDFEFE, 0xFFFFFF};

const unsigned Colormap::copper[] = {
0x000000, 0x010000, 0x020101, 0x030201, 0x050302, 0x060402, 0x070403, 0x080503,
0x0A0604, 0x0B0704, 0x0C0805, 0x0D0805, 0x0F0906, 0x100A06, 0x110B07, 0x120C07,
0x140C08, 0x150D08, 0x160E09, 0x170F09, 0x19100A, 0x1A100A, 0x1B110B, 0x1C120B,
0x1E130C, 0x1F140C, 0x20140D, 0x21150D, 0x23160E, 0x24170E, 0x25180F, 0x26180F,
0x281910, 0x291A10, 0x2A1B11, 0x2B1C11, 0x2C1C12, 0x2E1D12, 0x2F1E13, 0x301F13,
0x322014, 0x332014, 0x342115, 0x352215, 0x372316, 0x382416, 0x392417, 0x3A2517,
0x3C2618, 0x3D2718, 0x3E2819, 0x3F2819, 0x41291A, 0x422A1A, 0x432B1B, 0x442C1B,
0x462C1C, 0x472D1C, 0x482E1D, 0x492F1D, 0x4B301E, 0x4C301E, 0x4D311F, 0x4E321F,
0x503320, 0x513420, 0x523420, 0x533521, 0x553622, 0x563722, 0x573823, 0x583823,
0x593924, 0x5B3A24, 0x5C3B24, 0x5D3C25, 0x5F3C26, 0x603D26, 0x613E27, 0x623F27,
0x644028, 0x654028, 0x664128, 0x674229, 0x69432A, 0x6A442A, 0x6B442B, 0x6C452B,
0x6E462C, 0x6F472C, 0x70482C, 0x71482D, 0x73492E, 0x744A2E, 0x754B2F, 0x764C2F,
0x784C30, 0x794D30, 0x7A4E30, 0x7B4F31, 0x7D5032, 0x7E5032, 0x7F5133, 0x805233,
0x825334, 0x835434, 0x845434, 0x855535, 0x875636, 0x885736, 0x895837, 0x8A5837,
0x8C5938, 0x8D5A38, 0x8E5B38, 0x8F5C39, 0x915C3A, 0x925D3A, 0x935E3B, 0x945F3B,
0x96603C, 0x97603C, 0x98613C, 0x99623D, 0x9B633E, 0x9C643E, 0x9D643F, 0x9E653F,
0xA06640, 0xA16740, 0xA26841, 0xA36841, 0xA46941, 0xA66A42, 0xA76B43, 0xA86C43,
0xAA6C44, 0xAB6D44, 0xAC6E45, 0xAD6F45, 0xAF7046, 0xB07046, 0xB17147, 0xB27247,
0xB37348, 0xB57448, 0xB67449, 0xB77549, 0xB87649, 0xBA774A, 0xBB784B, 0xBC784B,
0xBE794C, 0xBF7A4C, 0xC07B4D, 0xC17C4D, 0xC37C4E, 0xC47D4E, 0xC57E4F, 0xC67F4F,
0xC88050, 0xC98050, 0xCA8151, 0xCB8251, 0xCC8351, 0xCE8452, 0xCF8453, 0xD08553,
0xD28654, 0xD38754, 0xD48855, 0xD58855, 0xD78956, 0xD88A56, 0xD98B57, 0xDA8C57,
0xDC8C58, 0xDD8D58, 0xDE8E59, 0xDF8F59, 0xE19059, 0xE2905A, 0xE3915B, 0xE4925B,
0xE6935C, 0xE7945C, 0xE8945D, 0xE9955D, 0xEB965E, 0xEC975E, 0xED985F, 0xEE985F,
0xF09960, 0xF19A60, 0xF29B61, 0xF39C61, 0xF49C61, 0xF69D62, 0xF79E63, 0xF89F63,
0xFAA064, 0xFBA064, 0xFCA165, 0xFDA265, 0xFFA366, 0xFFA466, 0xFFA467, 0xFFA567,
0xFFA668, 0xFFA768, 0xFFA869, 0xFFA869, 0xFFA969, 0xFFAA6A, 0xFFAB6B, 0xFFAC6B,
0xFFAC6C, 0xFFAD6C, 0xFFAE6D, 0xFFAF6D, 0xFFB06E, 0xFFB06E, 0xFFB16F, 0xFFB26F,
0xFFB370, 0xFFB470, 0xFFB471, 0xFFB571, 0xFFB671, 0xFFB772, 0xFFB873, 0xFFB873,
0xFFB974, 0xFFBA74, 0xFFBB75, 0xFFBC75, 0xFFBC76, 0xFFBD76, 0xFFBE77, 0xFFBF77,
0xFFC078, 0xFFC078, 0xFFC179, 0xFFC279, 0xFFC379, 0xFFC47A, 0xFFC47B, 0xFFC57B,
0xFFC67C, 0xFFC77C, 0xFFC87D, 0xFFC87D, 0xFFC97E, 0xFFCA7E, 0xFFCB7F, 0xFFCC7F};

const unsigned Colormap::pink[] = {
0x000000, 0x130D0D, 0x1C1212, 0x221616, 0x271A1A, 0x2C1D1D, 0x301F1F, 0x342222,
0x382424, 0x3B2727, 0x3E2929, 0x422B2B, 0x442D2D, 0x472F2F, 0x4A3030, 0x4D3232,
0x4F3434, 0x523535, 0x543737, 0x563838, 0x593A3A, 0x5B3B3B, 0x5D3D3D, 0x5F3E3E,
0x613F3F, 0x634141, 0x654242, 0x674343, 0x694444, 0x6B4646, 0x6D4747, 0x6E4848,
0x704949, 0x724A4A, 0x744C4C, 0x754D4D, 0x774E4E, 0x794F4F, 0x7A5050, 0x7C5151,
0x7D5252, 0x7F5353, 0x815454, 0x825555, 0x845656, 0x855757, 0x875858, 0x885959,
0x895A5A, 0x8B5B5B, 0x8C5C5C, 0x8E5D5D, 0x8F5E5E, 0x905E5E, 0x925F5F, 0x936060,
0x956161, 0x966262, 0x976363, 0x986464, 0x9A6464, 0x9B6565, 0x9C6666, 0x9E6767,
0x9F6868, 0xA06969, 0xA16969, 0xA36A6A, 0xA46B6B, 0xA56C6C, 0xA66D6D, 0xA76D6D,
0xA86E6E, 0xAA6F6F, 0xAB7070, 0xAC7070, 0xAD7171, 0xAE7272, 0xAF7373, 0xB17373,
0xB27474, 0xB37575, 0xB47676, 0xB57676, 0xB67777, 0xB77878, 0xB87878, 0xB97979,
0xBA7A7A, 0xBB7B7B, 0xBC7B7B, 0xBD7C7C, 0xBF7D7D, 0xC07D7D, 0xC17E7E, 0xC27F7F,
0xC2807F, 0xC38180, 0xC38381, 0xC48481, 0xC48682, 0xC58783, 0xC58983, 0xC58A84,
0xC68B84, 0xC68D85, 0xC78E86, 0xC79086, 0xC89187, 0xC89288, 0xC89488, 0xC99589,
0xC99689, 0xCA988A, 0xCA998B, 0xCB9A8B, 0xCB9C8C, 0xCB9D8D, 0xCC9E8D, 0xCC9F8E,
0xCDA18E, 0xCDA28F, 0xCDA390, 0xCEA490, 0xCEA591, 0xCFA791, 0xCFA892, 0xD0A992,
0xD0AA93, 0xD0AB94, 0xD1AC94, 0xD1AE95, 0xD2AF95, 0xD2B096, 0xD2B196, 0xD3B297,
0xD3B398, 0xD4B498, 0xD4B599, 0xD4B699, 0xD5B89A, 0xD5B99A, 0xD6BA9B, 0xD6BB9B,
0xD6BC9C, 0xD7BD9D, 0xD7BE9D, 0xD8BF9E, 0xD8C09E, 0xD8C19F, 0xD9C29F, 0xD9C3A0,
0xD9C4A0, 0xDAC5A1, 0xDAC6A1, 0xDBC7A2, 0xDBC8A2, 0xDBC9A3, 0xDCCAA3, 0xDCCBA4,
0xDDCCA4, 0xDDCDA5, 0xDDCEA5, 0xDECFA6, 0xDED0A6, 0xDED1A7, 0xDFD2A7, 0xDFD3A8,
0xE0D4A8, 0xE0D4A9, 0xE0D5AA, 0xE1D6AA, 0xE1D7AA, 0xE2D8AB, 0xE2D9AB, 0xE2DAAC,
0xE3DBAC, 0xE3DCAD, 0xE3DDAD, 0xE4DEAE, 0xE4DEAE, 0xE5DFAF, 0xE5E0AF, 0xE5E1B0,
0xE6E2B0, 0xE6E3B1, 0xE6E4B1, 0xE7E5B2, 0xE7E5B2, 0xE7E6B3, 0xE8E7B3, 0xE8E8B4,
0xE9E9B5, 0xE9E9B6, 0xE9E9B8, 0xEAEAB9, 0xEAEABA, 0xEAEABC, 0xEBEBBD, 0xEBEBBE,
0xEBEBC0, 0xECECC1, 0xECECC2, 0xEDEDC4, 0xEDEDC5, 0xEDEDC6, 0xEEEEC8, 0xEEEEC9,
0xEEEECA, 0xEFEFCB, 0xEFEFCD, 0xEFEFCE, 0xF0F0CF, 0xF0F0D0, 0xF0F0D2, 0xF1F1D3,
0xF1F1D4, 0xF2F2D5, 0xF2F2D6, 0xF2F2D8, 0xF3F3D9, 0xF3F3DA, 0xF3F3DB, 0xF4F4DC,
0xF4F4DD, 0xF4F4DE, 0xF5F5E0, 0xF5F5E1, 0xF5F5E2, 0xF6F6E3, 0xF6F6E4, 0xF6F6E5,
0xF7F7E6, 0xF7F7E7, 0xF7F7E9, 0xF8F8EA, 0xF8F8EB, 0xF8F8EC, 0xF9F9ED, 0xF9F9EE,
0xF9F9EF, 0xFAFAF0, 0xFAFAF1, 0xFAFAF2, 0xFBFBF3, 0xFBFBF4, 0xFBFBF5, 0xFCFCF6,
0xFCFCF7, 0xFCFCF8, 0xFDFDF9, 0xFDFDFA, 0xFDFDFB, 0xFEFEFC, 0xFEFEFD, 0xFFFFFF};

const unsigned Colormap::flag[] = {
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000,
0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000, 0xFF0000, 0xFFFFFF, 0x0000FF, 0x000000};


